home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.object,comp.lang.c++,comp.lang.java
- Path: newsfeed.acns.nwu.edu!ftpbox!mothost!schbbs!news
- From: shang@corp.mot.com (David L. Shang)
- Subject: Re: Java: What's the Big Deal?
- Reply-To: shang@corp.mot.com
- Organization: MOTOROLA
- Date: Mon, 1 Apr 1996 16:19:51 GMT
- Message-ID: <1996Apr1.161951.13666@schbbs.mot.com>
- References: <1996Apr1.155416.12816@schbbs.mot.com>
- Sender: news@schbbs.mot.com (SCHBBS News Account)
- Nntp-Posting-Host: 129.188.128.126
-
- In article <1996Apr1.155416.12816@schbbs.mot.com> shang@corp.mot.com (David L.
- Shang) writes:
- > GC is not always required. For example:
- >
- > class point
- > {
- > public:
- > float x;
- > float y;
- > float z;
- > };
- > class FaceSet
- > {
- > point[] coordIndex;
- > ...
- > public:
- > loadCoordIndex (char* file_name)
- > {
- > one million of points read here, and
- > coordIndex is created as an array of
- > a million of points.
- > };
- > };
-
- I am not saying that GC is not always required. In this case,
- coordIndex should be a smart reference, while the element of
- the array should be a variable by VALUE.
-
- A by-value variable is as clever as a smart reference, or even
- smarter in terms of its economy. Sometimes, though, it cannot keep
- the exact type of the object, which is not always required, as
- in this example.
-
- I am not saying Java's array is useless. It is useful in
- situitions where herterogeneous collections are required.
-
- But a language should let uers have choices.
-
- David Shang
-
-
-
-